﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
    namespace="Sripirom.ATS.Model.ServiceLog"
        assembly="Sripirom.ATS.Model">

    <class name="ServiceActivityLog" table="SERVICE_ACTIVITY_LOG" lazy="false" >
      <id name="Primary" column="SYSSERVICE_ACTIVITY_LOG_ID" >
        <generator class="sequence-identity">
          <param name="sequence">SEQ_SERVICE_ACTIVITY_LOG</param>
        </generator>
      </id>

      <property name="ActivityCode">
        <column name="ACTIVITY_CODE" sql-type="VARCHAR2(25)" not-null="false" />
      </property>
      <property name="ActivitySequence">
        <column name="ACTIVITY_SEQ" sql-type="NUMBER(30,0)" not-null="false" />
      </property>
      <property name="Status">
        <column name="ACTIVITY_STATUS" sql-type="VARCHAR2(25)" not-null="false" />
      </property>
      <property name="RequestMessage">
        <column name="REQUEST_MESSAGE" sql-type="CLOB" not-null="false" />
      </property>
      <property name="ResponseMessage">
        <column name="RESPONSE_MESSAGE" sql-type="CLOB" not-null="false" />
      </property>
      <property name="TransactionId">
        <column name="SYSREFERENCE_ID" sql-type="VARCHAR2(50)" not-null="false" />
      </property>
      <property name="Remark">
        <column name="REMARK" sql-type="VARCHAR2(200)" not-null="false" />
      </property>
      <many-to-one access="field.camelcase-underscore" name="ServiceTransactionLog"
                   class="ServiceTransactionLog"
                   column="SYSSERVICE_TRANSACTION_LOG_ID"
                   not-null="true"/>
      
      <property name="CreatedBy">
        <column name="CREATED_BY" sql-type="VARCHAR2(255)" not-null="false" />
      </property>
      <property name="CreatedDate">
        <column name="CREATED_DATETIME" sql-type="DATE" not-null="false" />
      </property>
      <property name="UpdatedBy">
        <column name="UPDATED_BY" sql-type="VARCHAR2(255)" not-null="false" />
      </property>
      <property name="UpdatedDate">
        <column name="UPDATED_DATETIME" sql-type="DATE" not-null="false" />
      </property>
    </class>

</hibernate-mapping>
